package com.inspur.edp.common.type;

import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author lizhaorui
 * @description TODO
 * @date 2024/5/27 15:37
 */

@Data
public class Method {

    private String code;

    private String name;

    private boolean isStatic;

    private TypeRefer returnType;

    private List<Parameter> parameters;

    private Map<String, DecorationOption> decorationMap;

    public void addDecoration(DecorationOption decoration) {
        if (this.decorationMap == null) {
            this.decorationMap = new HashMap<>();
        }
        this.decorationMap.put(decoration.getName(), decoration);
    }

}
